package com.itheima.api.hashset.demo03_1;

import java.util.HashSet;

public class HashDemo03 {

    public static void main(String[] args) {

        Student s1 = new Student("蓝湛");
        Student s2 = new Student("魏婴");
        Student s3 = new Student("温宁");
        Student s4 = new Student("蓝湛");

        HashSet<Student> hashSet = new HashSet<>();

        hashSet.add(s1);
        hashSet.add(s2);
        hashSet.add(s3);
        hashSet.add(s4);

        for(Student s : hashSet){
            System.out.println(s);
        }
    }
}
